﻿using System.Collections.ObjectModel;
using System.Configuration;
using MDCAdminTool.Properties;

namespace MDCAdminTool
{
    public class Clusters : ObservableCollection<CacheCluster>
    {
        public Clusters()
        {
            InitClusters();
        }

        private void InitClusters()
        {
            var cluster = new CacheCluster();
            try
            {
                var DistributedCacheConfigFile = Settings.Default.DistributedCacheConfigFile;
                cluster.InitCacheCluster( DistributedCacheConfigFile );
            }
            finally
            {
                Add( cluster );
            }
        }
    }
}
